package com.platform.system.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.platform.common.bean.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.validation.constraints.NotBlank;
import java.util.List;

/**
 * describe:文件表实体类
 *
 * @author Administrator
 * @date 2019/11/19
 * @Time 23:37
 */
@ApiModel(value = "文件", description = "文件SysFile")
@Data
@TableName(value = "sys_file")
public class SysFile extends BaseEntity<SysFile> {

    /**
     * 主键
     */
    @ApiModelProperty(value = "主键", name = "file_id", example = "32位uuid", required = true)
    @Id
    @Column(name = "file_id", length = 20, columnDefinition = "varchar(50) COMMENT '主键'")
    @TableId(type = IdType.ASSIGN_ID)
    private String fileId;
    /**
     * 文件名称
     */
    @ApiModelProperty(value = "文件名称", name = "file_name", example = "文件名称", required = true)
    @Column(name = "file_name", length = 50, columnDefinition = "varchar(50) COMMENT '文件名称'")
    @NotBlank(message = "文件名称不能为空")
    private String fileName;

    @ApiModelProperty(value = "文件路径", name = "file_path", example = "文件路径", required = true)
    @Column(name = "file_path", length = 500, columnDefinition = "varchar(500) COMMENT '文件路径'")
    @NotBlank(message = "文件名称不能为空")
    private String filePath;

    /**
     * 标记是否删除
     */
    @ApiModelProperty(value = "标记", name = "flag", example = "标记(diabale 删除 unable 正常)", required = true)
    @Column(name = "flag", length = 20, columnDefinition = "varchar(20) COMMENT '标记(diabale 删除 unable 正常)'")
    @TableField(fill = FieldFill.INSERT)
    private String flag;
}
